package com.cwh.controller;

import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

import com.cwh.entity.ActiveUser;
import com.cwh.entity.Employee;

@Controller
public class IndexController {
	@RequestMapping("/main")
	public String test(Model model) {
		//先获取身份信息->再获取账号
		ActiveUser activeUser = (ActiveUser)SecurityUtils.getSubject().getPrincipal();
		model.addAttribute("activeUser", activeUser);
		//跳转index视图
		return "index";
	}
}
